package day12;

import javax.sound.midi.SysexMessage;
import java.util.Scanner;
import java.lang.String;
public class learn4 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入任字符串:");
         String s=sc.next();
         char[] num=s.toCharArray();
         System.out.println("请输入任意字符:");
         String S= sc.next();
         char[] num2=S.toCharArray();
         for(int i=0;i<num.length;i++){
             for(int j=0;j< num2.length;j++){
             if(num2[j]==(num[i])){
                 System.out.println("在字符串的位置为:"+i);
                 break;
                 }
             }


         }



    }}

